/*
 * 数位拆分v1.0（3分）
 */

#include <stdio.h>

int main() {
	setbuf(stdout, NULL);

	int n = 4321, buffer[4], a = 0, b = 0;

	// note: 将原来的n的每一位拆分出来
	for (int i = 3; i >= 0; --i) {
		buffer[i] = n % 10;
		n /= 10;
	}

	// note: 形成n的高两位和低两位，分别存在a和b
	a = 10 * buffer[0] + buffer[1];
	b = 10 * buffer[2] + buffer[3];
	printf("a=%d,b=%d\n", a, b);

	// note: 进行5种运算，并输出
	printf("a+b=%d\n", a + b);
	printf("a-b=%d\n", a - b);
	printf("a*b=%d\n", a * b);
	printf("a/b=%.2f\n", (float) a / (float) b);
	printf("a%%b=%d\n", a % b);

	return 0;
}